package com.zz.parkingsystem.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 路段统计表
 * @TableName t_section_count
 */
@Data
public class SectionCount implements Serializable {
    /**
     * 路段统计表编号
     */
    private Integer scId;

    /**
     * 路段数量
     */
    private Integer scSectionNum;

    /**
     * 订单数量
     */
    private Integer scOrderNum;

    /**
     * 营收额
     */
    private BigDecimal scTotalAmount;

    /**
     * 退款订单数量
     */
    private Integer scRefundNum;

    /**
     * 退款订单金额
     */
    private BigDecimal scRefundAmount;

    /**
     * 异常订单数量
     */
    private Integer scExcOrderNum;

    /**
     * 异常订单金额
     */
    private BigDecimal scExcorderAmount;

    /**
     * 订单支付率
     */
    private BigDecimal scPayPercent;

    /**
     * 订单满意率
     */
    private BigDecimal scSatisfactionPercent;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SectionCount other = (SectionCount) that;
        return (this.getScId() == null ? other.getScId() == null : this.getScId().equals(other.getScId()))
            && (this.getScSectionNum() == null ? other.getScSectionNum() == null : this.getScSectionNum().equals(other.getScSectionNum()))
            && (this.getScOrderNum() == null ? other.getScOrderNum() == null : this.getScOrderNum().equals(other.getScOrderNum()))
            && (this.getScTotalAmount() == null ? other.getScTotalAmount() == null : this.getScTotalAmount().equals(other.getScTotalAmount()))
            && (this.getScRefundNum() == null ? other.getScRefundNum() == null : this.getScRefundNum().equals(other.getScRefundNum()))
            && (this.getScRefundAmount() == null ? other.getScRefundAmount() == null : this.getScRefundAmount().equals(other.getScRefundAmount()))
            && (this.getScExcOrderNum() == null ? other.getScExcOrderNum() == null : this.getScExcOrderNum().equals(other.getScExcOrderNum()))
            && (this.getScExcorderAmount() == null ? other.getScExcorderAmount() == null : this.getScExcorderAmount().equals(other.getScExcorderAmount()))
            && (this.getScPayPercent() == null ? other.getScPayPercent() == null : this.getScPayPercent().equals(other.getScPayPercent()))
            && (this.getScSatisfactionPercent() == null ? other.getScSatisfactionPercent() == null : this.getScSatisfactionPercent().equals(other.getScSatisfactionPercent()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getScId() == null) ? 0 : getScId().hashCode());
        result = prime * result + ((getScSectionNum() == null) ? 0 : getScSectionNum().hashCode());
        result = prime * result + ((getScOrderNum() == null) ? 0 : getScOrderNum().hashCode());
        result = prime * result + ((getScTotalAmount() == null) ? 0 : getScTotalAmount().hashCode());
        result = prime * result + ((getScRefundNum() == null) ? 0 : getScRefundNum().hashCode());
        result = prime * result + ((getScRefundAmount() == null) ? 0 : getScRefundAmount().hashCode());
        result = prime * result + ((getScExcOrderNum() == null) ? 0 : getScExcOrderNum().hashCode());
        result = prime * result + ((getScExcorderAmount() == null) ? 0 : getScExcorderAmount().hashCode());
        result = prime * result + ((getScPayPercent() == null) ? 0 : getScPayPercent().hashCode());
        result = prime * result + ((getScSatisfactionPercent() == null) ? 0 : getScSatisfactionPercent().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", scId=").append(scId);
        sb.append(", scSectionNum=").append(scSectionNum);
        sb.append(", scOrderNum=").append(scOrderNum);
        sb.append(", scTotalAmount=").append(scTotalAmount);
        sb.append(", scRefundNum=").append(scRefundNum);
        sb.append(", scRefundAmount=").append(scRefundAmount);
        sb.append(", scExcOrderNum=").append(scExcOrderNum);
        sb.append(", scExcorderAmount=").append(scExcorderAmount);
        sb.append(", scPayPercent=").append(scPayPercent);
        sb.append(", scSatisfactionPercent=").append(scSatisfactionPercent);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}